﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace FB.Data.Models
{
    [Serializable][DataContract]
    public class CodeValuePair
    {
        [DataMember]
        public string Code { get; set; }

        [DataMember]
        public string Name { get; set; }
    }

    
    [MetadataTypeAttribute(typeof(CompanyAnnotation))]
    public class Company : CodeValuePair {  }

    
    [MetadataTypeAttribute(typeof(DepartmentAnnotation))]
    public class Department : CodeValuePair {
        public string COMCode { get; set; }
    }


    [MetadataTypeAttribute(typeof(PositionAnnotation))]
    public class Position : CodeValuePair
    {
        public decimal Grading { get; set; }
    }


    [MetadataTypeAttribute(typeof(TeamAnnotation))]
    public class Team : CodeValuePair
    {
        public string DEPTCode { get; set; }
    }


    #region Annotations

    
    public  class CompanyAnnotation
    {
        [Display(ResourceType = typeof(Resources.Models.CodeValuePair), Name = "CompanyCode")]
        public string Code { get; set; }

        [Display(ResourceType = typeof(Resources.Models.CodeValuePair), Name = "CompanyName")]
        public string Name { get; set; }
    }

    
    public  class DepartmentAnnotation
    {
        [Display(ResourceType = typeof(Resources.Models.CodeValuePair), Name = "DepartmentCode")]
        public string Code { get; set; }

        [Display(ResourceType = typeof(Resources.Models.CodeValuePair), Name = "DepartmentName")]
        public string Name { get; set; }

        [Display(ResourceType = typeof(Resources.Models.CodeValuePair), Name = "CompanyCode")]
        public string COMCode { get; set; }
    }

    
    public  class PositionAnnotation
    {
        [Display(ResourceType = typeof(Resources.Models.CodeValuePair), Name = "PositionCode")]
        public string Code { get; set; }

        [Display(ResourceType = typeof(Resources.Models.CodeValuePair), Name = "PositionName")]
        public string Name { get; set; }

        [Display(ResourceType = typeof(Resources.Models.CodeValuePair), Name = "Grading")]
        public decimal Grading { get; set; }
    }

    
    public  class TeamAnnotation
    {
        [Display(ResourceType = typeof(Resources.Models.CodeValuePair), Name = "TeamCode")]
        public string Code { get; set; }

        [Display(ResourceType = typeof(Resources.Models.CodeValuePair), Name = "TeamName")]
        public string Name { get; set; }

        [Display(ResourceType = typeof(Resources.Models.CodeValuePair), Name = "DepartmentCode")]
        public string DEPTCode { get; set; }
    }

    #endregion
}
